<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <style type="text/css">
        *{margin:0; padding:0;-webkit-overflow-scrolling:touch;}
        a{text-decoration: none;}
        img{max-width: 100%; height: auto;}

        .page-wrap{max-height: calc(100vh - 67px);}
        .download{color: #4D4D4D; padding: 7.2% 6.8% 9.3%;}
        .download .entry-hd{font-size: 1.4em; font-weight: bold; text-align: center;}
        .download-btn{padding-top: 50%; text-align: center;}
        *::-webkit-scrollbar{width: 0 !important;}
        .download-btn .android-btn{ width:auto; margin:0 auto;}
        .android-btn, .ios-btn{display: inline-block;background: #38a40c;border-radius: 10px;padding: 5px 10px;}

        .footer-bg{position: fixed; bottom: 0; background: #2D2D2D; color: #E4E4E4; padding: 3.4% 2%; text-align: center;}
        .footer-bg .entry-con{font-size: 1em;}
        .imgClass{width: 50px; height: auto;display: inline-block;padding-right: 10px;}
        .imgDesClass{color:#fff;display: inline-block;transform: translateY(-18px);}

        #weixin-tip{display:none; position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;}
        #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%; position: relative;}
        #weixin-tip .close{
            color: #fff;
            padding: 5px;
            font: bold 20px/20px simsun;
            text-shadow: 0 1px 0 #ddd;
            position: absolute;
            top: 0; left: 5%;
        }
    </style>
    <script type="text/javascript" src="jquery-3.4.1.min.js"></script>
    <title>环境监测及预警管理平台app下载</title>
</head>
<body class="success">
<div class="page-wrap">
    <div class="download">
        <h3 class="entry-hd">
            环境监测及预警管理平台
        </h3>
        <div class="download-btn">
            <a class="android-btn" style="display: none;" id="J_weixin"><img src="android.png" class="imgClass" alt="APP下载"><span class="imgDesClass">安卓版下载</span></a>
            <br/>
            <div id="ios-install-step" style="display: none;">
                <div style="width: 100%;text-align: center;margin-bottom: 15px;">
                    <a class="ios-btn" id="ios-down-btn" style="display: none;" href="itms-services://?action=download-manifest&url=https://code.aliyun.com/2074394108/IciczApp/raw/master/IciczApp/release/IciczApp.plist"><img src="ios.png" class="imgClass" alt="APP下载"><span class="imgDesClass">苹果版下载</span></a>
                </div>
                <p style="margin: 0 0 15px 0;font-weight: bold;">苹果安装步骤</p>
                <p style="text-align: left; margin: 15px 0;">第一次安装应用完成后，点击应用会出现如下图中的提示，解决该情况的步骤在下面的说明中：</p>
                <img src="ios7.jpg">
                <p style="text-align: left; margin: 15px 0;">安装完应用后，在打开手机中的设置，点击通用，如下图：</p>
                <img src="ios1.png">
                <p style="text-align: left; margin: 15px 0;">点击设备管理，如下图：</p>
                <img src="ios2.png">
                <p style="text-align: left; margin: 15px 0;">点击CZD CORPORATION那项，如下图：</p>
                <img src="ios3.png">
                <p style="text-align: left; margin: 15px 0;">点击信任CZD CORPORATION那项，如下图：</p>
                <img src="ios4.png">
                <p style="text-align: left; margin: 15px 0;">点击信任，如下图：</p>
                <img src="ios5.png">
                <p style="text-align: left; margin: 15px 0;">最后显示如下即可：</p>
                <img src="ios6.png">
            </div>
        </div>
    </div>
    <div style="height: 67px; width: 100%;"></div>
    <div class="footer-bg" style="display: none;">
        <p class="entry-con">注：微信用户请在右上角选择“在浏览器中打开”，再选择下载应用</p>
    </div>
</div>
<div id="weixin-tip"><p><img src="live_weixin.png" alt="微信打开"/><span id="close" title="关闭" class="close">×</span></p></div>
<script type="text/javascript">
    var is_weixin = (function() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    })();
    window.onload = function(){
        var u = navigator.userAgent, btn;
        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
        if (isAndroid) {
            $(".android-btn").css("display", "inline-block");
            $(".download-btn").css("padding-top", "50%");
            $("#ios-install-step").css("display", "none");
            $(".ios-btn").css("display", "none");
            btn = document.getElementById('J_weixin');
        } else {
            $("#blockBg").css("display", "block");
            $("#ios-install-step").css("display", "block");
            $(".ios-btn").css("display", "inline-block");
            $(".download-btn").css("padding-top", "0");
            $(".android-btn").css("display", "none");
            btn = document.getElementById('ios-down-btn');
        }
        var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
        var tip = document.getElementById('weixin-tip');
        var close = document.getElementById('close');
        if(is_weixin){
            $(".footer-bg").css("display", "block");
            btn.onclick = function(e){
                tip.style.height = winHeight + 'px';
                tip.style.display = 'block';
                return false;
            };
            close.onclick = function(){
                tip.style.display = 'none';
            }
        } else {
            $(".page-wrap").css("max-height", "calc(100vh)");
            if (isAndroid) {
                btn.onclick = function(e){
                    $.ajax({ url: "http://60.165.130.142:8380/lcicz/baseinfo/api/masp/v1/app_versions/version.json?systemType=1",
                        success: function(data){
                            let apkUrl = "";
                            if(data.code == 200) {
                                if(data.data.path == "" || data.data.path == "null" || data.data.path == null ) {
                                    alert("暂无数据");
                                } else {
                                    apkUrl = data.data.path;
                                    var downLoadA = document.createElement('a');
                                    downLoadA.href = apkUrl;
                                    downLoadA.click();
                                }
                            } else {
                                alert("获取数据失败");
                            }
                        },error: function(error){
                            alert("获取数据失败");
                        }})
                }
            }
        }
    }
</script>
</body>
</html>